import React, {Component} from 'react';

class Child extends Component {
    state = {
        // user: [{id: '001', name: 'wl', age: 12}, {id: '002', name: 'zs', age: 14}, {id: '003', name: 'ww', age: 120}]
        user: 'abc'
    }

    render() {
        const {user} = this.state
        return (
            <div>
                {
                    user.map(item => <div>
                        <h3 key={item.id}>{item.name}---{item.age}</h3>
                    </div>)
                }
            </div>
        );
    }
}

export default Child;